
import json

jixu = '1'
config_data = None
with open('app_match_config.json') as fp:
    config_data = json.loads(fp.read())

    for k in config_data.keys():
        print(config_data[k])

    while jixu == '1':
        print('-------------fenge---------------------')
        print('\n')
        houzhuiming = input('可执行文件名: ')
        bieming = input('别名：')
        banben = input('是否区分版本？1-是 2-否：')
        jiagou = input('是否区分架构？1-是 2-否：')
        is_dv = False
        is_ax = False
        if banben == '1':
            is_dv = True
        if jiagou == '1':
            is_ax = True

        config_data[houzhuiming] = {"alias":bieming,"is_distinguish_version":is_dv,"is_distinguish_arch":is_ax}

        jixu = input('是否继续添加？1-继续 2-退出：')
    
with open('app_match_config.json','w') as fp:
    fp.write(json.dumps(config_data,indent=1))
        
